package com.mingliqiye.minecraft.enchantment.conflict.common;

import com.mingliqiye.minecraft.enchantment.conflict.common.enchantment.EnchantmentEntity;
import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface WebConfigCoreMeMethod {
    void reloadConfig();

    Map<String, ConfigPair> getDefConfig();

    Map<String, ConfigPair> getConfig();

    String getGameVersions();

    String getModVersions();

    String getLoaderVersions();

    default boolean getDevMode() {
        String classPath = Objects.requireNonNullElse(
            WebConfigCoreMeMethod.class.getResource("WebConfigCoreMeMethod.class"),
            ""
        ).toString();
        return classPath.contains("common.jar");
    }

    default String getModName() {
        return "[EDNC] Enchantment Does Not Conflict (附魔不冲突)";
    }

    String getLoaderName();

    List<EnchantmentEntity> getAllEnchantments();

    boolean getTest(Integer fid, Integer sid);

    void saveConfig(Map<String, ConfigPair> configPairMap);
}
